package hk.linkcredit.awardservice.award.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import hk.linkcredit.awardservice.award.domain.entity.AwardConfig;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 奖励配置Mapper接口
 *
 * @author african-loan
 * @date 2022-06-22
 */
public interface AwardConfigMapper extends BaseMapper<AwardConfig>{

    @Select("SELECT b.id,b.award_event_type,b.award_method,b.award_num,b.award_value,remark FROM award_act_config_relation a LEFT JOIN award_config b ON a.config_id=b.id WHERE a.act_id=#{actId}")
    List<AwardConfig> getAwardConfigs(@Param("actId") Long actId);
}
